<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "module".
 *
 * @property string $module_id
 * @property integer $module_parent_id
 * @property string $module_name
 * @property string $module_desc
 * @property string $module_link
 * @property integer $order
 * @property string $target
 * @property string $display
 */
class Module extends \common\models\base\BaseModel
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'module';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['module_parent_id', 'module_name', 'module_desc', 'module_link', 'order'], 'required'],
            [['module_parent_id', 'order'], 'integer'],
            [['target', 'display'], 'string'],
            [['module_name', 'module_link'], 'string', 'max' => 50],
            [['module_desc'], 'string', 'max' => 100]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'module_id' => '模块ID',
            'module_parent_id' => '模块父ID',
            'module_name' => '模块名称',
            'module_desc' => 'Desc',
            'module_link' => '链接',
            'order' => '排序',
            'target' => 'Target',
            'display' => '显示',
        ];
    }
}
